package cn.neusoft.feignClients.fallback;

import cn.neusoft.exception.AppException;
import cn.neusoft.feignClients.WarehouseFeignClient;
import cn.neusoft.vo.ResultBean;
import org.springframework.stereotype.Component;

@Component
public class WarehouseClientFallback implements WarehouseFeignClient {
    @Override
    public Long GetWarehouseStock(Long warehouseId) {
        throw new AppException(600, "库房服务异常");
    }

    @Override
    public ResultBean getCommodityWarehouse(String commodityId, Long warehouseId) {
        return ResultBean.error(600,"库房服务异常，熔断降级");
    }
}
